Custom Printer Library  1.17
ccw_Types.h File Reference

Data and parameters definition. More...

#include "ccw_Error.h"
#include "WinTypes.h"
#include "WinBase.h"
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  PrinterStruct
 
struct  USBDeviceStruct
 
struct  ETHDeviceStruct
 
struct  COMPortStruct
 
struct  PrintFontStruct
 
struct  PrintImageStruct
 
struct  PrintBarcodeStruct
 
struct  PrinterStatisticsStruct
 

Macros

#define MAXCHARBUFFER
 Lenght, in characters, of a standard string.
 
#define PRINTFONTSTRUCT_INIT
 
#define PRINTIMAGESTRUCT_INIT
 
#define PRINTBARCODESTRUCT_INIT
 
#define PRINTERSTATISTICSSTRUCT_INIT
 

Typedefs

typedef char int8
 Service type definition.
 
typedef short int16
 Service type definition.
 
typedef int int32
 Service type definition.
 
typedef unsigned char uint8
 Service type definition.
 
typedef unsigned short uint16
 Service type definition.
 
typedef unsigned int uint32
 Service type definition.
 

Enumerations

enum  CcwLogVerbosity : uint8 {
  CCW_LOG_DISABLED, CCW_LOG_FATAL, CCW_LOG_ERROR, CCW_LOG_WARNING,
  CCW_LOG_INFO, CCW_LOG_FUNCTIONS, CCW_LOG_DEBUG, CCW_LOG_DEEP_DEBUG
}
 Log verbosity. Set library log verbosity using InitLibrary More...
 
enum  RAWBitDepth : BYTE { MONOCHROMATIC_1BIT, GREYSCALE_8BIT, RGB_24BIT }
 RAW Bit depth type More...
 
enum  UsbInterfaceType : BYTE { USB_INT_PRINTER }
 Usb communication interface type More...
 
enum  CommunicationPortType : BYTE { COMMTYPE_USB, COMMTYPE_COM, COMMTYPE_NET, COMMTYPE_OTHER }
 Communication port More...
 
enum  FontSize : BYTE {
  FONT_SIZE_X1, FONT_SIZE_X2, FONT_SIZE_X3, FONT_SIZE_X4,
  FONT_SIZE_X5, FONT_SIZE_X6, FONT_SIZE_X7, FONT_SIZE_X8
}
 Print Text : Font scale More...
 
enum  FontJustification : BYTE { FONT_JUSTIFICATION_LEFT, FONT_JUSTIFICATION_CENTER, FONT_JUSTIFICATION_RIGHT }
 Print Text : text justification More...
 
enum  FontType : BYTE { FONT_TYPE_1, FONT_TYPE_2, FONT_TYPE_3, FONT_TYPE_4 }
 Print Text : Font type More...
 
enum  FontInternationalCharset : BYTE { FONT_CS_DEFAULT }
 Print Text : Font international Charset More...
 
enum  CutType : BYTE { CUT_TOTAL, CUT_PARTIAL }
 Paper cut type More...
 
enum  EjectType : BYTE { EJ_EJECT, EJ_RETRACT }
 Eject paper type More...
 
enum  PaperAlignType : BYTE { PALIGN_PRINT, PALIGN_CUT }
 Paper alignment type More...
 
enum  CashDrawerType : BYTE { CASH_DRAWER_1, CASH_DRAWER_2 }
 Cash Drawer connector pin More...
 
enum  ImageScale : BYTE { IMAGE_SCALE_NONE, IMAGE_SCALE_TO_FIT, IMAGE_SCALE_TO_WIDTH }
 Print Image : scaling type More...
 
enum  ImageAlign : BYTE { IMAGE_ALIGN_TO_LEFT, IMAGE_ALIGN_TO_CENTER, IMAGE_ALIGN_TO_RIGHT }
 Print Image : Image justification More...
 
enum  ImageGRMode : BYTE { IMAGE_GRMODE_DITHERING, IMAGE_GRMODE_THRESHOLD }
 Print Image : threshold mode to print the Image More...
 
enum  BarcodeHRIPosition : BYTE { BARCODE_HRI_NONE, BARCODE_HRI_TOP, BARCODE_HRI_BOTTOM, BARCODE_HRI_TOPBOTTOM }
 Print Barcode : Barcode HRI Position More...
 
enum  BarcodeAlign : BYTE { BARCODE_ALIGN_TO_LEFT, BARCODE_ALIGN_TO_CENTER, BARCODE_ALIGN_TO_RIGHT }
 Print Barcode : Barcode justification More...
 
enum  BarcodeType : WORD {
  BARCODE_TYPE_NONE, BARCODE_TYPE_CODABAR, BARCODE_TYPE_UPCA, BARCODE_TYPE_UPCE,
  BARCODE_TYPE_EAN13, BARCODE_TYPE_EAN8, BARCODE_TYPE_CODE39, BARCODE_TYPE_ITF,
  BARCODE_TYPE_CODE93, BARCODE_TYPE_CODE128, BARCODE_TYPE_CODE32, BARCODE_TYPE_EAN128,
  BARCODE_TYPE_QRCODE, BARCODE_TYPE_PDF417, BARCODE_TYPE_DATAMATRIX, BARCODE_TYPE_AZTEC,
  BARCODE_TYPE_MAXICODE
}
 Print Barcode : Barcode type More...
 
enum  Com_Settings_Baudrate : DWORD {
  COM_SETT_BAUDRATE_AUTO, COM_SETT_BAUDRATE_1200, COM_SETT_BAUDRATE_2400, COM_SETT_BAUDRATE_4800,
  COM_SETT_BAUDRATE_9600, COM_SETT_BAUDRATE_19200, COM_SETT_BAUDRATE_38400, COM_SETT_BAUDRATE_57600,
  COM_SETT_BAUDRATE_115200
}
 Com port Settings : Baudrate More...
 
enum  Com_Settings_Parity : BYTE { COM_SETT_PARITY_NONE, COM_SETT_PARITY_ODD, COM_SETT_PARITY_EVEN }
 Com port Settings : Parity More...
 
enum  Com_Settings_NBits : BYTE { COM_SETT_NBITS_8, COM_SETT_NBITS_7 }
 Com port Settings : Num Bits More...
 
enum  Com_Settings_StopBits : BYTE { COM_SETT_STOPBITS_1, COM_SETT_STOPBITS_2 }
 Com port Settings : Stop Bits More...
 
enum  Com_Settings_FlowControl : BYTE { COM_SETT_FLOW_CONTROL_NONE, COM_SETT_FLOW_CONTROL_HW, COM_SETT_FLOW_CONTROL_XONXOFF }
 Com port Settings : Flow Control More...
 
enum  ClearableField : BYTE { CUTS_COUNTER, CUT_ERRORS, PRINTED_LENGTH_DM }
 Statistics settings : Clearable fields More...
 
enum  TrPrintMode : BYTE { TP_TRANSACTION_REC, TP_TRANSACTION_STOP, TP_TRANSACTION_PRINT, TP_TRANSACTION_CLEAN }
 Transaction Print More...
 
enum  OpenDeviceMode : BYTE { TXRX, STS, TXRX_STS }
 Open Communication Port Mode More...
 
enum  DevCounterType : BYTE {
  HEAD_TEMPERATURE, NUM_POWERON, POWER_VOLTAGE, NUM_CUTS,
  NUM_RETRACT, TOTAL_PAPER_REM, PAPER_PRINTED, NUM_COVER_OPEN
}
 Counter types supported by the devices More...
 

Detailed Description

Data and parameters definition.

Macro Definition Documentation

◆ PRINTBARCODESTRUCT_INIT

#define PRINTBARCODESTRUCT_INIT

Init value to set the PrintBarcodeStruct to default

◆ PRINTERSTATISTICSSTRUCT_INIT

#define PRINTERSTATISTICSSTRUCT_INIT

Init value to set the PrinterStatisticsStruct to default

◆ PRINTFONTSTRUCT_INIT

#define PRINTFONTSTRUCT_INIT

Init value to set the PrintFontStruct to default

◆ PRINTIMAGESTRUCT_INIT

#define PRINTIMAGESTRUCT_INIT

Init value to set the PrintImageStruct to default

Enumeration Type Documentation

◆ BarcodeAlign

enum BarcodeAlign : BYTE

Print Barcode : Barcode justification

Enumerator
BARCODE_ALIGN_TO_LEFT 

Indicates that the Barcode Justification is Left

BARCODE_ALIGN_TO_CENTER 

Indicates that the Barcode Justification is Center

BARCODE_ALIGN_TO_RIGHT 

Indicates that the Barcode Justification is Right

◆ BarcodeHRIPosition

enum BarcodeHRIPosition : BYTE

Print Barcode : Barcode HRI Position

Enumerator
BARCODE_HRI_NONE 

Indicates no HRI on the Barcode

BARCODE_HRI_TOP 

Indicates HRI on TOP of the Barcode

BARCODE_HRI_BOTTOM 

Indicates HRI on BOTTOM of the Barcode

BARCODE_HRI_TOPBOTTOM 

Indicates HRI on TOP and BOTTOM of the Barcode

◆ BarcodeType

enum BarcodeType : WORD

Print Barcode : Barcode type

Enumerator
BARCODE_TYPE_NONE 

The barcode type isn't selected

BARCODE_TYPE_CODABAR 

Indicates to print a CODEBAR Barcode

BARCODE_TYPE_UPCA 

Indicates to print a UPCA Barcode

BARCODE_TYPE_UPCE 

Indicates to print a UPCE Barcode

BARCODE_TYPE_EAN13 

Indicates to print a EAN13 Barcode

BARCODE_TYPE_EAN8 

Indicates to print a EAN8 Barcode

BARCODE_TYPE_CODE39 

Indicates to print a CODE39 Barcode

BARCODE_TYPE_ITF 

Indicates to print a ITF Barcode

BARCODE_TYPE_CODE93 

Indicates to print a CODE93 Barcode

BARCODE_TYPE_CODE128 

Indicates to print a CODE128 Barcode

BARCODE_TYPE_CODE32 

Indicates to print a CODE32 Barcode

BARCODE_TYPE_EAN128 

Indicates to print a EAN128 Barcode

BARCODE_TYPE_QRCODE 

Indicates to print a QRCODE Barcode 2D

BARCODE_TYPE_PDF417 

Indicates to print a PDF417 Barcode 2D

BARCODE_TYPE_DATAMATRIX 

Indicates to print a DATAMATRIX Barcode 2D

BARCODE_TYPE_AZTEC 

Indicates to print a AZTEC Barcode 2D

BARCODE_TYPE_MAXICODE 

Indicates to print a MAXICODE Barcode 2D

◆ CashDrawerType

enum CashDrawerType : BYTE

Cash Drawer connector pin

Enumerator
CASH_DRAWER_1 

Indicates that the cash drawer selected is DRW1

CASH_DRAWER_2 

Indicates that the cash drawer selected is DRW2

◆ CcwLogVerbosity

Log verbosity. Set library log verbosity using InitLibrary

Enumerator
CCW_LOG_DISABLED 

Log completely disabled

CCW_LOG_FATAL 

Only log fatal errors

CCW_LOG_ERROR 

(normal) Log errors. Program will continue

CCW_LOG_WARNING 

Also log warning - something suspicious occured

CCW_LOG_INFO 

Also log hints and informational messages

CCW_LOG_FUNCTIONS 

Log functions methods messages

CCW_LOG_DEBUG 

Log all messages, also debug messages. Use only if required

CCW_LOG_DEEP_DEBUG 

Log all messages, also deep debug messages. Use only if required. Could slow down the communication

◆ ClearableField

enum ClearableField : BYTE

Statistics settings : Clearable fields

Enumerator
CUTS_COUNTER 

Associated with the machine's internal cuts counter

CUT_ERRORS 

Associated with the machine's internal cut errors counter

PRINTED_LENGTH_DM 

Associated with the machine's internal printed length counter

◆ Com_Settings_Baudrate

enum Com_Settings_Baudrate : DWORD

Com port Settings : Baudrate

Enumerator
COM_SETT_BAUDRATE_AUTO 

Indicates that the RS232 is set to auto baudrate

COM_SETT_BAUDRATE_1200 

Indicates that the RS232 baudrate to 1200

COM_SETT_BAUDRATE_2400 

Indicates that the RS232 baudrate to 2400

COM_SETT_BAUDRATE_4800 

Indicates that the RS232 baudrate to 4800

COM_SETT_BAUDRATE_9600 

Indicates that the RS232 baudrate to 9600

COM_SETT_BAUDRATE_19200 

Indicates that the RS232 baudrate to 19200

COM_SETT_BAUDRATE_38400 

Indicates that the RS232 baudrate to 38400

COM_SETT_BAUDRATE_57600 

Indicates that the RS232 baudrate to 57600

COM_SETT_BAUDRATE_115200 

Indicates that the RS232 baudrate to 115200

◆ Com_Settings_FlowControl

Com port Settings : Flow Control

Enumerator
COM_SETT_FLOW_CONTROL_NONE 

Indicates that the RS232 Flow Control None

COM_SETT_FLOW_CONTROL_HW 

Indicates that the RS232 Flow Control Hardware

COM_SETT_FLOW_CONTROL_XONXOFF 

Indicates that the RS232 Flow Control Xon Xoff (Software)

◆ Com_Settings_NBits

enum Com_Settings_NBits : BYTE

Com port Settings : Num Bits

Enumerator
COM_SETT_NBITS_8 

Indicates that the RS232 Num bits 8

COM_SETT_NBITS_7 

Indicates that the RS232 Num bits 7

◆ Com_Settings_Parity

enum Com_Settings_Parity : BYTE

Com port Settings : Parity

Enumerator
COM_SETT_PARITY_NONE 

Indicates that the RS232 Parity None

COM_SETT_PARITY_ODD 

Indicates that the RS232 Parity Odd

COM_SETT_PARITY_EVEN 

Indicates that the RS232 Parity Even

◆ Com_Settings_StopBits

enum Com_Settings_StopBits : BYTE

Com port Settings : Stop Bits

Enumerator
COM_SETT_STOPBITS_1 

Indicates that the RS232 Stop bits 1

COM_SETT_STOPBITS_2 

Indicates that the RS232 Stop bits 2

◆ CommunicationPortType

enum CommunicationPortType : BYTE

Communication port

Enumerator
COMMTYPE_USB 

Usb

COMMTYPE_COM 

Serial / Com

COMMTYPE_NET 

Net / Ethernet / Wifi

COMMTYPE_OTHER 

Unknown

◆ CutType

enum CutType : BYTE

Paper cut type

Enumerator
CUT_TOTAL 

Indicates to perform a Total Cut

CUT_PARTIAL 

Indicates to perform a Partial Cut

◆ DevCounterType

enum DevCounterType : BYTE

Counter types supported by the devices

Enumerator
HEAD_TEMPERATURE 

If supported by the device, this counter is the temperature, in 0.1°C, of the printer Head (for e.g. a value of 255 is a temperature of 25.5°C)

NUM_POWERON 

If supported by the device, this counter is the number of power on

POWER_VOLTAGE 

If supported by the device, this counter is the power voltage, in 0.1V (for e.g. a value of 241 is a power voltage of 24.1V)

NUM_CUTS 

If supported by the device, this counter is the number of "cuts" performed

NUM_RETRACT 

If supported by the device, this counter is the number of "retract" performed

TOTAL_PAPER_REM 

If supported by the device, this counter is the total paper remaining in the roll (when near paper end is segnaled) in cm

PAPER_PRINTED 

If supported by the device, this counter is the total of paper printed in cm

NUM_COVER_OPEN 

If supported by the device, this counter is the number of "cover open"

◆ EjectType

enum EjectType : BYTE

Eject paper type

Enumerator
EJ_EJECT 

Indicates to perform a Eject

EJ_RETRACT 

Indicates to perform a Retract

◆ FontInternationalCharset

Print Text : Font international Charset

Enumerator
FONT_CS_DEFAULT 

Indicates that the International Charset is Default

◆ FontJustification

enum FontJustification : BYTE

Print Text : text justification

Enumerator
FONT_JUSTIFICATION_LEFT 

Indicates that the Font Justification is Left

FONT_JUSTIFICATION_CENTER 

Indicates that the Font Justification is Center

FONT_JUSTIFICATION_RIGHT 

Indicates that the Font Justification is Right

◆ FontSize

enum FontSize : BYTE

Print Text : Font scale

Enumerator
FONT_SIZE_X1 

Indicates that the Font Size is 1X

FONT_SIZE_X2 

Indicates that the Font Size is 2X

FONT_SIZE_X3 

Indicates that the Font Size is 3X

FONT_SIZE_X4 

Indicates that the Font Size is 4X

FONT_SIZE_X5 

Indicates that the Font Size is 5X

FONT_SIZE_X6 

Indicates that the Font Size is 6X

FONT_SIZE_X7 

Indicates that the Font Size is 7X

FONT_SIZE_X8 

Indicates that the Font Size is 8X

◆ FontType

enum FontType : BYTE

Print Text : Font type

Note
Refer to the User Manual to verify the font supported by each device
Enumerator
FONT_TYPE_1 

Indicates that the Font 1

FONT_TYPE_2 

Indicates that the Font 2

FONT_TYPE_3 

Indicates that the Font 3

FONT_TYPE_4 

Indicates that the Font 4

◆ ImageAlign

enum ImageAlign : BYTE

Print Image : Image justification

Enumerator
IMAGE_ALIGN_TO_LEFT 

Indicates that the Picture Justification is Left

IMAGE_ALIGN_TO_CENTER 

Indicates that the Picture Justification is Center

IMAGE_ALIGN_TO_RIGHT 

Indicates that the Picture Justification is Right

◆ ImageGRMode

enum ImageGRMode : BYTE

Print Image : threshold mode to print the Image

Enumerator
IMAGE_GRMODE_DITHERING 

Indicates that the Image will be converted to Black / White using Dithering way. Best Quality for Photos and Graphics but slow(Default)

IMAGE_GRMODE_THRESHOLD 

Indicates that the Image will be converted to Black / White using Threshold way Best Quality for Text, but not for graphics, but quick

◆ ImageScale

enum ImageScale : BYTE

Print Image : scaling type

Enumerator
IMAGE_SCALE_NONE 

Indicates that the Picture will be No scaling. Excess size will be ignored

IMAGE_SCALE_TO_FIT 

Indicates that the Picture will be Scale to fit the paper width

IMAGE_SCALE_TO_WIDTH 

Indicates that the Picture will be Scale the image to width given by width parameter

◆ OpenDeviceMode

enum OpenDeviceMode : BYTE

Open Communication Port Mode

Enumerator
TXRX 

Indicates the library will open only the standard communication channel of the device

STS 

Indicates the library will open, if supported, only the status communication channel of the device

TXRX_STS 

Indicates the library will open the standard and, if supported, the status communication channels of the device (Default)

◆ PaperAlignType

enum PaperAlignType : BYTE

Paper alignment type

Enumerator
PALIGN_PRINT 

Indicates to perform a Paper alignment under the printing line

PALIGN_CUT 

Indicates to perform a Paper alignment under the cutting line

◆ RAWBitDepth

enum RAWBitDepth : BYTE

RAW Bit depth type

Enumerator
MONOCHROMATIC_1BIT 

The raw image is Monochromatic

GREYSCALE_8BIT 

The raw image is 256 level greyscale

RGB_24BIT 

The raw image is 24 bit RGB

◆ TrPrintMode

enum TrPrintMode : BYTE

Transaction Print

Enumerator
TP_TRANSACTION_REC 

Indicates the library will buffer the print data until the function is called with the TP_TRANSACTION_STOP or TP_TRANSACTION_PRINT

TP_TRANSACTION_STOP 

Indicates the library stop to store the print data

TP_TRANSACTION_PRINT 

Indicates the library stop to store and prints all the print data stored

TP_TRANSACTION_CLEAN 

Indicates the library cleans all the print data stored

◆ UsbInterfaceType

enum UsbInterfaceType : BYTE

Usb communication interface type

Enumerator
USB_INT_PRINTER 

The usb interface is a PRINTER